/** COPYRIGHT(C) 2008. Loc Phan. All Rights Reserved.
    A class that create a person
    @author Loc Phan
    @version 1.01 2008-11-11
*/
package edu.sjsu.cs.phan.lab12.Book;

public class Person
{
   /**Constructs a Person
    * 
    */
    public Person()
    {
       name = "unknown name";
       maximumBooks = 3;
       age = 0;
    }
    /**Return person's name
     * 
     * @return Name of Person
     */
    public String getName()
    {
       return name;
    }
    /**Change person's name
     * 
     * @param aName Name needed to be changed to
     */
    public void setName(String aName)
    {
      name = aName;
    }
    /**Return the maximum number of books
     * 
     * @return Number of Books
     */
    public int getMaximumBooks()
   {
      return maximumBooks;
   }
   /**Set maximum number of books
    * 
    * @param maximumBooks number of books
    */
   public void setMaximumBooks(int maximumBooks)
   {
      this.maximumBooks = maximumBooks;
   }
   /**Return age of a person
    * 
    * @return Age
    */
   public int getAge()
   {
      return age;
   }
   /**Set age of a person
    * 
    * @param age Age needed to be set to
    */
   public void setAge(int age)
   {
      this.age = age;
   }
   public String toString()
   {
      return this.getName() + " ("+ this.getMaximumBooks() + " books)";
   }
   private String name;
   private int maximumBooks;
   private int age;
}
